using Castle.MonoRail.Framework;
using IronMis2.Models;

namespace IronMis2.Controllers
{
    public class CompanyController:BaseController
    {
        public void New()
        {

        }
        [AccessibleThrough(Verb.Post)]
        public void Save([DataBind("company")] Company company)
        {
            company.CreateAndFlush();
            PropertyBag["company"] = company;

            Redirect("company", "Detail");
        }

        public void Detail()
        {
            RenderView("Company", "Detail");
        }

        public void Edit([DataBind("company")] Company company)
        {
            RenderView("Edit");
        }
        public void Update([DataBind("company")] Company company)
        {
            company.UpdateAndFlush();
            PropertyBag["company"] = company;

            Redirect("Company", "Detail");
        }
    }
}
